<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IEToChrome</title>
</head>

<body>
    <div>请在IE浏览器中打开该页面</div>
    <script>
        const IEToChrome = url =>
            new ActiveXObject('WScript.Shell').Run('chrome ' + url, 0, true);
        const isIE = () => {
            // 测试条件编译
            // IE6~10 支持
            const isIE_Gte6Lte10 = /*@cc_on!@*/ false;
            // 测试 documentMode
            // IE7~11 支持
            const isIE_Gte7Lte11 = !!document.documentMode;
            return isIE_Gte6Lte10 || isIE_Gte7Lte11;
        }
        if (isIE()) {
            IEToChrome(location.href);
        }
    </script>
</body>

</html>